package com.tulele.vtool.config;

import com.tulele.vtool.task.process.KefuMsgExpiredRemindPushTask;
import com.tulele.vtool.task.process.UserDailyBrandSetInfoPushScheTask;
import com.tulele.vtool.task.process.UserOperateDataPushScheTask;
import com.tulele.vtool.task.process.VipDiscountActivityPush.VipDiscountActivityInfoPushTask;
import com.tulele.vtool.task.process.articlePush.*;
import com.tulele.vtool.task.process.remindActivePush.FirstTimeRemindUserActivePushScheTask;
import com.tulele.vtool.task.process.remindActivePush.ThirdTimeRemindUserActivePushScheTask;
import org.quartz.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class QuartzConfig {

    @Bean
    public JobDetail pushJobOneDetail() {
        JobDetail jobDetail = JobBuilder.newJob(FirstTimeArticleInfoPushTask.class)
                .withIdentity("pushJob1","pushJobGroup1")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param1")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerOne() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobOneDetail())
                .withIdentity("pushTrigger1","pushTriggerGroup1")
                .usingJobData("job_trigger1_param","job_trigger1_param1")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 05 6 * * ? *"))
                .build();
        return trigger;
    }

    /*****************************************************************/

    @Bean
    public JobDetail pushJobTwoDetail() {
        JobDetail jobDetail = JobBuilder.newJob(SecondTimeArticleInfoPushTask.class)
                .withIdentity("pushJob2","pushJobGroup2")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param2")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerTwo() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobTwoDetail())
                .withIdentity("pushTrigger2","pushTriggerGroup2")
                .usingJobData("job_trigger2_param","job_trigger2_param1")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 05 8 * * ? *"))
                .build();
        return trigger;
    }

    /*****************************************************************/

    @Bean
    public JobDetail pushJobThreeDetail() {
        JobDetail jobDetail = JobBuilder.newJob(ThirdTimeArticleInfoPushTask.class)
                .withIdentity("pushJob3","pushJobGroup3")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param3")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerThree() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobThreeDetail())
                .withIdentity("pushTrigger3","pushTriggerGroup3")
                .usingJobData("job_trigger3_param","job_trigger3_param1")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 11 18 * * ? *"))
                .build();
        return trigger;
    }

    //专业号(14:30) 屏蔽于20210607
//    @Bean
//    public JobDetail pushJob1430Detail() {
//        JobDetail jobDetail = JobBuilder.newJob(Time1430ArticleInfoPushTask.class)
//                .withIdentity("pushJob28","pushJobGroup28")
//                //JobDataMap可以给任务execute传递参数
//                .usingJobData("job_param","job_param28")
//                .storeDurably()
//                .build();
//        return jobDetail;
//    }
//
//    @Bean
//    public Trigger pushTrigger1430() {
//        Trigger trigger = TriggerBuilder.newTrigger()
//                .forJob(pushJob1430Detail())
//                .withIdentity("pushTrigger28","pushTriggerGroup28")
//                .usingJobData("job_trigger28_param","job_trigger28_param1")
//                .startNow()
//                .withSchedule(CronScheduleBuilder.cronSchedule("0 30 14 * * ? *"))
//                .build();
//        return trigger;
//    }

    /*****************************************************************/

    @Bean
    public JobDetail pushJobForthDetail() {
        JobDetail jobDetail = JobBuilder.newJob(ForthTimeArticleInfoPushTask.class)
                .withIdentity("pushJob4","pushJobGroup4")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param4")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerForth() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobForthDetail())
                .withIdentity("pushTrigger4","pushTriggerGroup4")
                .usingJobData("job_trigger4_param","job_trigger4_param1")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 10 21 * * ? *"))
                .build();
        return trigger;
    }


    /*****************************************************************/

    @Bean
    public JobDetail pushJobFifthDetail() {
        JobDetail jobDetail = JobBuilder.newJob(FifthTimeArticleInfoPushTask.class)
                .withIdentity("pushJob16","pushJobGroup16")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param16")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerFifth() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobFifthDetail())
                .withIdentity("pushTrigger16","pushTriggerGroup16")
                .usingJobData("job_trigger16_param","job_trigger16_param1")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 05 11 * * ? *"))
                .build();
        return trigger;
    }

    /************************20200503 日报模板消息 推送 (屏蔽于20210629)*****************************************/

//    @Bean
//    public JobDetail pushJobDailyPaper() {
//        JobDetail jobDetail = JobBuilder.newJob(DailyPaperTempMsgPushTask.class)
//                .withIdentity("pushJob17","pushJobGroup17")
//                //JobDataMap可以给任务execute传递参数
//                .usingJobData("job_param","job_param17")
//                .storeDurably()
//                .build();
//        return jobDetail;
//    }
//
//    @Bean
//    public Trigger pushTriggerDailyPaper() {
//        Trigger trigger = TriggerBuilder.newTrigger()
//                .forJob(pushJobDailyPaper())
//                .withIdentity("pushTrigger17","pushTriggerGroup17")
//                .usingJobData("job_trigger17_param","job_trigger17_param17")
//                .startNow()
//                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
//                .withSchedule(CronScheduleBuilder.cronSchedule("0 30 18 * * ? *"))
//                .build();
//        return trigger;
//    }

    /************************20200504 yl 周报推送****************************************************/
    @Bean
    public JobDetail pushJobWeekly() {
        JobDetail jobDetail = JobBuilder.newJob(WeeklyTempMsgPushTask.class)
                .withIdentity("pushJob18","pushJobGroup18")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param18")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerWeekly() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobWeekly())
                .withIdentity("pushTrigger18","pushTriggerGroup18")
                .usingJobData("job_trigger18_param","job_trigger18_param18")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 0 15 ? * L"))
                .build();
        return trigger;
    }
    /************************20200504 yl 服务到期提醒****************************************************/



    /************************20210413 hyl 补发****************************************************/
//
    @Bean
    public JobDetail pushJob_BF() {
        JobDetail jobDetail = JobBuilder.newJob(BFArticleInfoPushTask.class)
                .withIdentity("pushJob24","pushJobGroup24")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param24")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTrigger_BF() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJob_BF())
                .withIdentity("pushTrigger24","pushTriggerGroup24")
                .usingJobData("job_trigger24_param","job_trigger24_param24")
                .startNow()
                .withSchedule(CronScheduleBuilder.cronSchedule("0 42 16 * * ?"))
                .build();
        return trigger;
    }


//    @Bean
//    public JobDetail pushJob430() {
//        JobDetail jobDetail = JobBuilder.newJob(UploadTempMsgPush430Task.class)
//                .withIdentity("pushJob430","pushJobGroup430")
//                //JobDataMap可以给任务execute传递参数
//                .usingJobData("job_param","job_param430")
//                .storeDurably()
//                .build();
//        return jobDetail;
//    }
//
//    @Bean
//    public Trigger pushTrigger430() {
//        Trigger trigger = TriggerBuilder.newTrigger()
//                .forJob(pushJob430())
//                .withIdentity("pushTrigger430","pushTriggerGroup430")
//                .usingJobData("job_trigger430_param","job_trigger430_param1")
//                .startNow()
//                .withSchedule(CronScheduleBuilder.cronSchedule("0 30 4 * * ? *"))
//                .build();
//        return trigger;
//    }

//    @Bean
//    public JobDetail pushJob_UploadTemp() {
//        JobDetail jobDetail = JobBuilder.newJob(UploadTempMsgPushTask.class)
//                .withIdentity("pushJob25","pushJobGroup25")
//                //JobDataMap可以给任务execute传递参数
//                .usingJobData("job_param","job_param25")
//                .storeDurably()
//                .build();
//        return jobDetail;
//    }
//
//    @Bean
//    public Trigger pushTrigger_UploadTemp() {
//        Trigger trigger = TriggerBuilder.newTrigger()
//                .forJob(pushJob_UploadTemp())
//                .withIdentity("pushTrigger25","pushTriggerGroup25")
//                .usingJobData("job_trigger25_param","job_trigger25_param25")
//                .startNow()
//                .withSchedule(CronScheduleBuilder.cronSchedule("0 1 19 * * ?"))
//                .build();
//        return trigger;
//    }

    /************************20201231 hyl 拉新推送****************************************************/


    /************************20210327 hyl 开单爆文 启客宝 发文章 20210618 屏蔽****************************************************/

//    @Bean
//    public JobDetail pushJob_20210327qqbl() {
//        JobDetail jobDetail = JobBuilder.newJob(MsgAsync20210327MsgPushTask.class)
//                .withIdentity("pushJob26","pushJobGroup26")
//                //JobDataMap可以给任务execute传递参数
//                .usingJobData("job_param","job_param26")
//                .storeDurably()
//                .build();
//        return jobDetail;
//    }
//
//    @Bean
//    public Trigger pushTrigger_20210327qqbl() {
//
//        Trigger trigger = TriggerBuilder.newTrigger()
//                .forJob(pushJob_20210327qqbl())
//                .withIdentity("pushTrigger26","pushTriggerGroup26")
//                .usingJobData("job_trigger26_param","job_trigger26_param26")
//                .startNow()
//                .withSchedule(CronScheduleBuilder.cronSchedule("0 30 19 * * ?"))
//                .build();
//        return trigger;
//    }
    /************************20210327 hyl 开单爆文 启客宝 发文章****************************************************/


    @Bean
    public JobDetail pushJobExpirationReminder() {
        JobDetail jobDetail = JobBuilder.newJob(ExpirationReminderTempMsgPushTask.class)
                .withIdentity("pushJob19","pushJobGroup19")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param19")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerExpirationReminder() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobExpirationReminder())
                .withIdentity("pushTrigger19","pushTriggerGroup19")
                .usingJobData("job_trigger19_param","job_trigger19_param19")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 0 14 * * ?"))
                .build();
        return trigger;
    }

    /************************20200504 yl 续费提醒****************************************************/
    @Bean
    public JobDetail pushJobRenewalReminder() {
        JobDetail jobDetail = JobBuilder.newJob(RenewalReminderTempMsgPushTask.class)
                .withIdentity("pushJob20","pushJobGroup20")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param20")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerRenewalReminder() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobRenewalReminder())
                .withIdentity("pushTrigger20","pushTriggerGroup20")
                .usingJobData("job_trigger20_param","job_trigger20_param20")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 30 13 * * ?"))
                .build();
        return trigger;
    }

    /************************20200520 yl 每天晚上八点钟推送****************************************************/
    @Bean
    public JobDetail pushJobSixthTime() {
        JobDetail jobDetail = JobBuilder.newJob(SixthTimeArticleMsgPushTask.class)
                .withIdentity("pushJob21","pushJobGroup21")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param21")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerSixthTime() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobSixthTime())
                .withIdentity("pushTrigger21","pushTriggerGroup21")
                .usingJobData("job_trigger21_param","job_trigger21_param21")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 10 20 * * ?"))
                .build();
        return trigger;
    }

    /************************20200603 hyl 每天早上9点半推送****************************************************/
    @Bean
    public JobDetail pushJobNewUser10Time() {
        JobDetail jobDetail = JobBuilder.newJob(NewUserPushTask.class)
                .withIdentity("pushJob22","pushJobGroup22")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param22")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerNewUser10Time() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobNewUser10Time())
                .withIdentity("pushTrigger22","pushTriggerGroup22")
                .usingJobData("job_trigger22_param","job_trigger22_param22")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 30 9 * * ?"))
                .build();
        return trigger;
    }



    /************************20200603 hyl 每天16点推送****************************************************/
    /*
    @Bean
    public JobDetail pushJobNewUser16Time() {
        JobDetail jobDetail = JobBuilder.newJob(NewUserPushTask.class)
                .withIdentity("pushJob23","pushJobGroup23")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param23")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerNewUser16Time() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobNewUser16Time())
                .withIdentity("pushTrigger23","pushTriggerGroup23")
                .usingJobData("job_trigger23_param","job_trigger23_param23")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 0 16 * * ?"))
                .build();
        return trigger;
    }
    */
    /************************newSubWxPushUser，屏蔽于20200410*****************************************/
/*
    @Bean
    public JobDetail pushJobFiveDetail() {
        JobDetail jobDetail = JobBuilder.newJob(NewUserBrandSetInfoPushTask.class)
                .withIdentity("pushJob5","pushJobGroup5")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param5")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerFive() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobFiveDetail())
                .withIdentity("pushTrigger5","pushTriggerGroup5")
                .usingJobData("job_trigger5_param","job_trigger5_param1")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 0/5 * * * ? *"))
                .build();
        return trigger;
    }

 */

    /*************************newSubWxPushUser，屏蔽于20200410*********************************/
/*
    @Bean
    public JobDetail pushJobSixDetail() {
        JobDetail jobDetail = JobBuilder.newJob(NewUserVisitInfoPushTask.class)
                .withIdentity("pushJob6","pushJobGroup6")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param6")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerSix() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobSixDetail())
                .withIdentity("pushTrigger6","pushTriggerGroup6")
                .usingJobData("job_trigger6_param","job_trigger6_param1")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 0/8 * * * ? *"))
                .build();
        return trigger;
    }

 */

    /****************************newSubWxPushUser******************************/

//    @Bean
//    public JobDetail pushJobSevenDetail() {
//        JobDetail jobDetail = JobBuilder.newJob(UploadTempMsgPushTask.class)
//                .withIdentity("pushJob7","pushJobGroup7")
//                //JobDataMap可以给任务execute传递参数
//                .usingJobData("job_param","job_param7")
//                .storeDurably()
//                .build();
//        return jobDetail;
//    }
//
//    @Bean
//    public Trigger pushTriggerSeven() {
//        Trigger trigger = TriggerBuilder.newTrigger()
//                .forJob(pushJobSevenDetail())
//                .withIdentity("pushTrigger7","pushTriggerGroup7")
//                .usingJobData("job_trigger7_param","job_trigger7_param1")
//                .startNow()
//                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
//                .withSchedule(CronScheduleBuilder.cronSchedule("0 15 19 * * ? *"))
//                .build();
//        return trigger;
//    }



    /***********************超过 24 小时或连续多条消息没有互动，不走数据库***********************************/

    @Bean
    public JobDetail pushJobKefuMsgExpiredRemindDetail() {
        JobDetail jobDetail = JobBuilder.newJob(KefuMsgExpiredRemindPushTask.class)
                .withIdentity("pushJob8","pushJobGroup8")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param8")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerKefuMsgExpiredRemind() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobKefuMsgExpiredRemindDetail())
                .withIdentity("pushTrigger8","pushTriggerGroup8")
                .usingJobData("job_trigger8_param","job_trigger8_param8")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 0 0/2 * * ? *"))
                .build();
        return trigger;
    }

    /**********************会员数据播报，不走数据库************************************/

    @Bean
    public JobDetail pushJobUserOperateDataPushDetail() {
        JobDetail jobDetail = JobBuilder.newJob(UserOperateDataPushScheTask.class)
                .withIdentity("pushJob9","pushJobGroup9")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param9")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerUserOperateDataPush() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobUserOperateDataPushDetail())
                .withIdentity("pushTrigger9","pushTriggerGroup9")
                .usingJobData("job_trigger9_param","job_trigger9_param9")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 01 17 * * ? *"))
                .build();
        return trigger;
    }

    /************************伙伴都在追踪客户**********************************/

    @Bean
    public JobDetail pushJobFirstTimeRemindUserActivePushDetail() {
        JobDetail jobDetail = JobBuilder.newJob(FirstTimeRemindUserActivePushScheTask.class)
                .withIdentity("pushJob10","pushJobGroup10")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param10")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerFirstTimeRemindUserActivePush() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobFirstTimeRemindUserActivePushDetail())
                .withIdentity("pushTrigger10","pushTriggerGroup10")
                .usingJobData("job_trigger10_param","job_trigger10_param10")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 20 20 * * ? *"))
                .build();
        return trigger;
    }

    /************************你不在的时候，有客户对你感兴趣**********************************/
    // yl 屏蔽于20200521
   /* @Bean
    public JobDetail pushJobSecondTimeRemindUserActivePushDetail() {
        JobDetail jobDetail = JobBuilder.newJob(SecondTimeRemindUserActivePushScheTask.class)
                .withIdentity("pushJob11","pushJobGroup11")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param11")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerSecondTimeRemindUserActivePush() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobSecondTimeRemindUserActivePushDetail())
                .withIdentity("pushTrigger11","pushTriggerGroup11")
                .usingJobData("job_trigger11_param","job_trigger11_param11")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 0 9 * * ? *"))
                .build();
        return trigger;
    }*/

    /**********************有人看了你的文章，说明对你很关注************************************/

    @Bean
    public JobDetail pushJobThirdTimeRemindUserActivePushDetail() {
        JobDetail jobDetail = JobBuilder.newJob(ThirdTimeRemindUserActivePushScheTask.class)
                .withIdentity("pushJob12","pushJobGroup12")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param12")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerThirdTimeRemindUserActivePush() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobThirdTimeRemindUserActivePushDetail())
                .withIdentity("pushTrigger12","pushTriggerGroup12")
                .usingJobData("job_trigger12_param","job_trigger12_param12")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 40 20 * * ? *"))
                .build();
        return trigger;
    }

    /**************************提醒用户设置品牌********************************/

    @Bean
    public JobDetail pushJobUserDailyBrandSetInfoPushDetail() {
        JobDetail jobDetail = JobBuilder.newJob(UserDailyBrandSetInfoPushScheTask.class)
                .withIdentity("pushJob13","pushJobGroup13")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param13")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerUserDailyBrandSetInfoPush() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobUserDailyBrandSetInfoPushDetail())
                .withIdentity("pushTrigger13","pushTriggerGroup13")
                .usingJobData("job_trigger13_param","job_trigger13_param13")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 0 11 * * ? *"))
                .build();
        return trigger;
    }

    /**************************用户首次分享文章推送 ，屏蔽于20200410*************************/
    /*
    @Bean
    public JobDetail pushJobUserFirstShareArticleInfoPushDetail() {
        JobDetail jobDetail = JobBuilder.newJob(FirstTimeShareArticlePushTask.class)
                .withIdentity("pushJob14","pushJobGroup14")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param14")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerUserFirstShareArticleInfoPush() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushJobUserFirstShareArticleInfoPushDetail())
                .withIdentity("pushTrigger14","pushTriggerGroup14")
                .usingJobData("job_trigger14_param","job_trigger14_param14")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 0/1 * * * ? *"))
                .build();
        return trigger;
    }
    */


    /**************************用户VIP优惠过期推送*************************/
    @Bean
    public JobDetail pushVipDiscountActivityInfoPushDetail() {
        JobDetail jobDetail = JobBuilder.newJob(VipDiscountActivityInfoPushTask.class)
                .withIdentity("pushJob15","pushJobGroup15")
                //JobDataMap可以给任务execute传递参数
                .usingJobData("job_param","job_param15")
                .storeDurably()
                .build();
        return jobDetail;
    }

    @Bean
    public Trigger pushTriggerVipDiscountActivityInfoPush() {
        Trigger trigger = TriggerBuilder.newTrigger()
                .forJob(pushVipDiscountActivityInfoPushDetail())
                .withIdentity("pushTrigger15","pushTriggerGroup15")
                .usingJobData("job_trigger15_param","job_trigger15_param15")
                .startNow()
                //.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever())
                .withSchedule(CronScheduleBuilder.cronSchedule("0 0 0/1 * * ? *"))
                .build();
        return trigger;
    }

}
